<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Wings extends CI_Controller {

	/**
	 * Index Page for this controller.
	 *
	 * Maps to the following URL
	 * 		http://example.com/index.php/welcome
	 *	- or -  
	 * 		http://example.com/index.php/welcome/index
	 *	- or -
	 * Since this controller is set as the default controller in 
	 * config/routes.php, it's displayed at http://example.com/
	 *
	 * So any other public methods not prefixed with an underscore will
	 * map to /index.php/welcome/<method_name>
	 * @see http://codeigniter.com/user_guide/general/urls.html
	 */
	public function index()
	{
		
		$this->load->view('header');
		$this->load->view('home');
		$this->load->view('footer');
	}


	
	public function committee($wingName,$sectionName=''){

		$data["wingsList"]=$this->wing_model->getList();
		$this->load->view('header');
		$data["wingName"]=$wingName;
		$data["wing_content"]=$this->wing_model->getWingContent("p2",$wingName);
		$data["activeTab"]="committee";
		$this->load->view("wing-default",$data);
		$this->load->view('footer');

	}


	public function overview($wingName,$sectionName=''){

		$data["wingsList"]=$this->wing_model->getList();

		$this->load->view('header');
		$data["wingName"]=$wingName;
		$data["wing_content"]=$this->wing_model->getWingContent("p1",$wingName);
		$data["activeTab"]="overview";
		$this->load->view("wing-default",$data);
		$this->load->view('footer');

	}


	public function events($wingName,$sectionName=''){

		$data["wingsList"]=$this->wing_model->getList();
		$this->load->view('header');
		$data["wingName"]=$wingName;
		$data["wing_content"]=$this->wing_model->getWingContent("p3",$wingName);
		$data["activeTab"]="events";
		$this->load->view("wing-default",$data);
		$this->load->view('footer');

	}

	public function news($wingName,$sectionName=''){

		$data["wingsList"]=$this->wing_model->getList();
		$this->load->view('header');
		$data["wingName"]=$wingName;
	$data["wing_content"]=$this->wing_model->getWingContent("p4",$wingName);
			$data["activeTab"]="news";
		$this->load->view("wing-default",$data);
		$this->load->view('footer');

	}

	
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */